import {
  http3,
  http4
} from "../axios.js";

// 获取系统字典接口
export function getDictionary(data) {
  return http4.get({
    url: `/user/dict/${data}`,
    data,
  });
}

// 获取设备供应商列表接口
export function getEquipmentSupplier(data) {
  return http4.get({
    url: `/user/device/vendor/list/${data}`,
    data,
  });
}

// 获取班组列表接口
export function getTeamGroup(data) {
  return http4.get({
    url: `/road/teamGroup/list`,
    data,
  });
}

// 所属行政区
export function getCanton(data) {
  return http4.get({
    url: "/user/region/tree",
    data,
  });
}

// 根据行政区获取路段列表接口
export function getRoadList(data) {
  return http4.get({
    // url: `/road/section/list/by/region/${data}`,
    url: `/road/section/list?regionId=${data}`,
    data,
  });
}

// 获取收费员列表下拉框
export function getTollmanList(data) {
  return http4.get({
    url: "/user/cashier/list",
    data,
  });
}

// 根据路段获取泊位列表下拉框接口
export function getBerthList(data) {
  console.log("relationForm.data ===>", data);
  return http4.get({
    url: `/road/berth/list/by/${data.sectionId}/${data.deviceCode}`,
    data,
  });
}

// 获取设备供应商列表接口
export function getVendorList(data) {
  return http4.get({
    url: `/user/device/vendor/list/${data}`,
    data,
  });
}

// 获取车场列表下拉框接口
export function getCparkList() {
  return http4.get({
    url: '/cpark/kvs'
  })
}

// 获取路段列表（下拉框）接口
export function getSectionList() {
  return http4.get({
    url: '/road/section/list'
  })
}